package com.yc.navy.dayfresh.config;

import java.io.FileWriter;

import java.io.IOException;

public class AlipayConfig {
	// 应用ID，您的APPID,收款账号既是您的APPID对应支付宝账号
	public static String app_id = "2021000121669999";

	// 商户私钥,您的PKCS8格式RSA2私钥
	public static String merchant_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCnAFgZ/VwjrL/Lby6yehaAvCRuaLpT2pszGJc4nfvBFWtLWSqRxdvi8Kr5aSzZVwcko1iJa2KRHec1oR2TU9QC5GjyZaTvHDZBLQYdzhNxbvnYMiTK6o2qAOIqbauLTFq4fRo/VM+V+aDYiy0+xqaTXxBOv4JQvRX/bu5yAG/0IjlAr+FBkPlWwF2rHJ6LQJBnc8Q19FEWKGS5FMiC1y//dXPYHkns91CGtAF17G7UCWI+irug9hogYvzzsJ2AGXC+XwLSCcGIpDkZhq+rdiNS6yCu8b/S6GiG4dMdKzED4JSj0XF1HHBRDh9v7KPWYLGs7KwuatzzkbzjnJfdOayjAgMBAAECggEAL10Gn6BesHN/FdhbmxzLIwm5H2MubTfTyoMP6GvOCe3kN0N7sko2Wb++DeyJXr6y9O4q3xaIpvWfLHOcartcptFW/mBbjcEnlgaJ9IwMsaAy1eEq1C3/rZaAjl36SBCIrkg02H9aPIPG3YNjeqlmdueAPYVNFU77XS1+DPEYz1krGdaKMeoAPMAH+Qg8hBpttf79VHARk/7pzM39+2ZUdvbzRLEeUhvT/C5QZw/nD9BvppPBTvzla2E2BlcbiP1030gmo4F/9o/5wQwaKyBNxAwrYzoaknwOP342BTFSgU9Wi/mrf+3UYLGOm1X2sILg0guEPEjtiiQNrQZEOvxmOQKBgQDs8m2ZEVzdvlttOvAVEk4AY1/Xe1KfobuqGLMtEnZMkdfEP+GRACt4cRaCsQkn6mn4DuVRT7rLqhbQsuj/Z3k/xEhIt0mMoO0ijiqFGVWz3zxdIjJvQVRxRc7S6suwaqneGamBwUcqhdnv4wJa6hAfNsCusyYJ3rluSLq/rmEejQKBgQC0bhRjwXcjpGaU/3dRNG1hKvojFd9o+uJorj1mlhk+Jbb/YxFdVLnM0WShxmmTk89FEUjjsGodk+Mev3LmsVPuhoTGXgQ9OSR0pEOCcJi3kBVolkWCK9BdSpJBwEIrfGqZIT5aM4vUlfG9hlLkFX0G6fic3b54frlgEXSQwJyD7wKBgQCux2xcmlgcIQwjmHP7txLeam8J7afWpGBfafTQ7Gtis7mqw0xJvwxRvWlTYe9VCC6+kY5J2jv5ey91JmOD8fmYNdrz+G9CUnpZIPDwWO3EzogiUtVNB62YGFwlbJhvO16tu9QzKDSsgyttLdBQ65KU07hxpSgL48R4OyG1vpVZCQKBgARY3p7kq2UtcddHLG3FcJk1ut8biM1ztf7Fq+8L0MHhkL4oeeOgxfU8WktXh3WpywWj+/iYaIYb6Q31mOQcA6SskwhgfYOoG8u/pWzAH73Ud9+UN0qCmbuVr15sLmvzzHGyDlmIAmd10WQ6l0atidyfyICnCw7GJts8sG1IZrz7AoGAKlcK4/YgcI6pF6hnJlnzuSL4mR0WWg9XDmOqCPf7uq2lwBtehAVbDgaYabWr88EZiVoK0eAQ7uXEBtn2z6+CqyG42bp7qeDHVjySWDVLRUJGMLbkVEItzJwYzDy3r1qqatmQr8x47MiL4OrK2ufnEoGQcvwotrHxr8eq9LSCvm0=";

	// 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
	public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAigUpRRHCrGAJFmRyRNTwnBw7CttDn/Yh8NC0a2WXKosnMQYJpeoLh5wqadeNXEkHsCZ7ilT/MxH5UdMWaYSdzu5/KJZgQXCyIdKIhVVZtzrvTrLRaZbaMGGVJnZwNQWQckDtQs1ItL/54s+BQsjLXkMyI3SWIJz4XTlu6U0ZtDoMG0MkuYwVRsYFcNsmQVoVz28RjgIuXUp4ePeIJaa3sMxjzcMYymSvl7jWdPWK8yaeUuDVN2vIJcnhpybcbWtQavaU9F0vm2nOhHFkDtdF54+9zEV8qlqwmirRZwxIfpgoKKZyfxnSPxBvnMsAs1vcZgeauD9iOGbANHu4evK3CwIDAQAB";

	// 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String notify_url = "http://127.0.0.1:6688/alipay/notify_url";

	// 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	//public static String return_url = "http://127.0.0.1:8080/snacknet/return_url.jsp";
	public static String return_url = "http://127.0.0.1:6688/alipay/return_url";

	// 签名方式
	public static String sign_type = "RSA2";

	// 字符编码格式
	public static String charset = "utf-8";

	// 支付宝网关
	public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

	// 支付宝网关
	public static String log_path = "C:\\";
	// public static String log_path = "/";

	/** 
	 * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
	 * @param sWord 要写入日志里的文本内容
	 */
	public static void logResult(String sWord) {
		FileWriter writer = null;
		try {
			writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
			writer.write(sWord);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (writer != null) {
				try {
					writer.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
	}
}